using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskCommand
{
readonly static Action<TaskCommand,object>[] _SetValues=new Action<TaskCommand,object>[]{(r,t)=>r.CommandType=Reflection.ParseObject(t, r.CommandType),(r,t)=>r.Hidden=Reflection.ParseObject(t, r.Hidden),(r,t)=>r.ShapeId=Reflection.ParseObject(t, r.ShapeId),(r,t)=>r.TaskId=Reflection.ParseObject(t, r.TaskId),(r,t)=>r.TaskStatus=Reflection.ParseObject(t, r.TaskStatus),(r,t)=>r.Text=Reflection.ParseObject(t, r.Text)};
readonly static string[] _Columns=new string[]{"CommandType","Hidden","ShapeId","TaskId","TaskStatus","Text"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"CommandType", this.CommandType);
AppendValue(action,"Hidden", this.Hidden);
AppendValue(action,"ShapeId", this.ShapeId);
AppendValue(action,"TaskId", this.TaskId);
AppendValue(action,"TaskStatus", this.TaskStatus);
AppendValue(action,"Text", this.Text);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[6];
cols[0]= RecordColumn.Column("CommandType",this.CommandType);
cols[1]= RecordColumn.Column("Hidden",this.Hidden);
cols[2]= RecordColumn.Column("ShapeId",this.ShapeId);
cols[3]= RecordColumn.Column("TaskId",this.TaskId);
cols[4]= RecordColumn.Column("TaskStatus",this.TaskStatus);
cols[5]= RecordColumn.Column("Text",this.Text);
return cols;
}

}
}

